GtkListBox: No need to manually clamp adjustment to focus
authorAlexander Larsson <alexl@redhat.com>
Mon, 10 Jun 2013 12:41:51 +0000 (14:41 +0200)
committerAlexander Larsson <alexl@redhat.com>
Thu, 13 Jun 2013 10:17:06 +0000 (12:17 +0200)
Now that we use real widgets for rows the focus_vadjustment is
enough.

gtk/gtklistbox.c

index 55402c310d43b686cce6d0a6d6047bf6a83a2ac1..97c25d2151bf5a76715271aab09d67b16acaf77a 100644 (file)
@@ -781,14 +781,6 @@ gtk_list_box_update_cursor (GtkListBox *list_box,
   priv->cursor_row = row;
   gtk_widget_grab_focus (GTK_WIDGET (row));
   gtk_widget_queue_draw (GTK_WIDGET (row));
-  if (row != NULL && priv->adjustment != NULL)
-    {
-      GtkAllocation allocation;
-      gtk_widget_get_allocation (GTK_WIDGET (list_box), &allocation);
-      gtk_adjustment_clamp_page (priv->adjustment,
-                                 priv->cursor_row->priv->y + allocation.y,
-                                 priv->cursor_row->priv->y + allocation.y + priv->cursor_row->priv->height);
-  }
   _gtk_list_box_accessible_update_cursor (list_box, row);
 }